APPNAME=client

LIBPATH=`pwd`/./libs/
INCPATH=`pwd`/./inc/
SQINCPATH=${LIBPATH}/install/include
SQLIBPATH=${LIBPATH}install/lib

CFLAGS+=-I${LIBPATH}
CFLAGS+=-I${INCPATH}
CFLAGS+=-I${SQINCPATH}

LDFLAGS+=-L${LIBPATH} -lmydata
LDFLAGS+=-L${SQLIBPATH} -lsqlite3

CC=gcc

all:
	make -C libs
	make -C src
	${CC} ${CFLAGS} client.c -o ${APPNAME} ${LDFLAGS}

clean:
	rm -f ${APPNAME}

run:
	export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${LIBPATH} && ./${APPNAME} -p 7777 -h studio.iot-yun.club -t 2
